// 订单服务
const mongoose = require('mongoose');
const orderServicesSchema = new mongoose.Schema({
    time: String, // 下单时间
	orderTime: String, // 预约时间
    state: String, // 订单服务状态）待付款/待完成/待评价/已完成）
    kind:String, // 种类
    money:String, // 实际支付金额
    serviceId:{
        type: mongoose.Schema.Types.ObjectId,
        ref: "servicesModel"
    }, // 所属订单的服务id 

	userId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "usersModel"
    }, //	订单服务所属用户id
    
    addressesId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "addressesModel"
    }, // 所属地址

	adminId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "adminsModel"
    }, // 所属门店管理员id
	shopId: {
        type: mongoose.Schema.Types.ObjectId,
        ref: "shopsModel"
    }, // 所属门店id
});
module.exports = mongoose.model('orderServicesModel',orderServicesSchema,'orderServices');
